package unit10;

import java.awt.*;
import javax.swing.*;

public class Ex10_3_BorderLayoutTest extends JFrame {
    public Ex10_3_BorderLayoutTest() {
        Container container = getContentPane();
        container.setLayout(new BorderLayout(5, 10));
        container.add(new JButton("East"), BorderLayout.EAST);
        container.add(new JButton("South"), BorderLayout.SOUTH);
        container.add(new JButton("West"), BorderLayout.WEST);
        container.add(new JButton("North"), BorderLayout.NORTH);
        container.add(new JButton("Center"), BorderLayout.CENTER);
    }
    public static void main(String[] args) {
        Ex10_3_BorderLayoutTest frame = new Ex10_3_BorderLayoutTest();
        frame.setTitle("Show BorderLayout");
        frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
        frame.setSize(300, 200);
        frame.setVisible(true);
    }
}
